<html>
<body>
Reports variable declarations that can be moved inside a <code>when</code> expression.
<p><b>Example:</b></p>
<pre><code>
fun someCalc(x: Int) = x * 42

fun foo(x: Int): Int {
  val a = someCalc(x)
  return when (a) {
    1 -&gt; a
    2 -&gt; 2 * a
    else -&gt; 24
  }
}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>
fun foo(x: Int): Int {
  return when (val a = someCalc(x)) {
    1 -&gt; a
    2 -&gt; 2 * a
    else -&gt; 24
  }
}
</code></pre>
</body>
</html>